{{useCss "/app-pages/css/user/tickets.scss"}}
<div class="ticket_state">
	<href to="/user/tickets.html?state=1" class="{{($Cache.user.tickets.state==1)&&'focus'}}">未使用</href>
	<href to="/user/tickets.html?state=2" class="{{($Cache.user.tickets.state==2)&&'focus'}}">已使用</href>
	<href to="/user/tickets.html?state=3" class="{{($Cache.user.tickets.state==3)&&'focus'}}">已过期</href>
</div>
<div class="tickets_list">
	{{#if $Cache.user.tickets.list.length}}
	{{#each $Cache.user.tickets.list}}
    <div class="ticket">
        <div class="name">{{ticket_factory.info.name}}</div>
        <div class="ticket_info">
            <label>{{ticket_factory.info.config.cut_cash}}元</label>
            满{{ticket_factory.info.config.full_cash}}元使用
            <div class="item">
            	所属：{{ticket_factory.bus_id}}
            </div>
            <div class="item">{{ticket_factory.info.intro}}</div>
        </div>
        <div class="ticket_type">
            <div class="item">
                过期： {{#Time ticket_factory.info.diedline,"YYYY-MM-DD","永久"}}
            </div>
            <div class="item">
            </div>
        </div>
    </div>
    {{/each}}
    {{#else}}
	<div class="ticket">
		<div class="none">
			此目录下没有东西
		</div>
	</div>
    {{/if}}
</div>
